package dq.utils;

public class KMP {
    public static int match(String s, String t){

        int[] next = getNext(t);

        int j = 0;
        for(int i=0;i<s.length();i++){

            if(s.charAt(i) != t.charAt(j)){
                j = next[j];
            }
        }

        return 0;
    }
    private static int[] getNext(String t){
        int[] next = new int[t.length()];


        return next;
    }
}
